package domain;

public class Enemy {
	private Point location;
	private int appearTime;
	private int life;
	private int speed;
	
	
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + appearTime;
		result = prime * result + life;
		result = prime * result
				+ ((location == null) ? 0 : location.hashCode());
		result = prime * result + speed;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Enemy other = (Enemy) obj;
		if (appearTime != other.appearTime)
			return false;
		if (life != other.life)
			return false;
		if (location == null) {
			if (other.location != null)
				return false;
		} else if (!location.equals(other.location))
			return false;
		if (speed != other.speed)
			return false;
		return true;
	}

	public Enemy(int x,int y,int appearTime,int life,int speed){
		this.location = new Point(x,y);
		this.appearTime = appearTime;
		this.life = life;
		this.speed = speed;
	}

	public Point getPosition() {
		return location;
	}

	public int getAppearTime() {
		return appearTime;
	}

	public int getLife() {
		return life;
	}

	public int getSpeed() {
		return speed;
	}
	
}
